<include file="App/Admin/View/Public/left.html"/>
  <script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
  <script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
  <script type="text/javascript" charset="utf-8" src="__PUBLIC__/kindeditor/plugins/prettify.js"></script>
<div class="admin">
<div class="panel admin-panel margin-top" id="add">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 添加类别片</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="{:U('Ptype/addPtype')}" enctype="multipart/form-data">  
	<input type="hidden" class="input w50" value="{$re.tid}" name="tid" />
          <div class="form-group">
        <div class="label">
          <label>类别名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$re.tname}" name="tname" />
          <div class="tips"></div>
        </div>
      </div>
	  
	  <div class="form-group">
        <div class="label">
          <label>排序：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$re.sort}" name="sort" />
          <div class="tips"></div>
        </div>
      </div>
		<div class="form-group">
        <div class="label">
          <label>上级分类：</label>
        </div>
        <div class="field">
		  <select name="pid" id="pid"  class="input input-auto">
		  	<option value="0">顶级分类</option>
			<volist name="list" id="vo">
				<option value="{$vo.tid}"  <eq name="tlist.tid" value="$vo.tid">selected="selected"</eq>>__{$vo.tname}</option>
				<!--<option value="{$vo.tid}">__{$vo.tname}</option>-->
				<volist name="vo.children" id="voo">
					<option value="{$voo.tid}"  <eq name="tlist.tid" value="$voo.tid">selected="selected"</eq>>____{$voo.tname}</option>
					<!--<option value="{$voo.tid}">____{$voo.tname}</option>-->
				</volist>
			</volist>
		  </select>
          <div class="tips"></div>
        </div>
      </div>
  
    <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> {$but}</button>
        </div>
      </div>
    </form>
	
  </div>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">    
 function preview(file)  
 {  
 var prevDiv = document.getElementById('preview');  
 if (file.files && file.files[0])  
 {  
 var reader = new FileReader();  
 reader.onload = function(evt){  
 prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';  
}    
 reader.readAsDataURL(file.files[0]);  
}  
 
 }function preview1(file)  
 {  
 var prevDiv = document.getElementById('preview1');  
 if (file.files && file.files[0])  
 {  
 var reader = new FileReader();  
 reader.onload = function(evt){  
 prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';  
}    
 reader.readAsDataURL(file.files[0]);  
}  
 
 }
 </script>